Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / ChartCollection Class / Add Method / Add<T>(Int32,Int32,Int32,Int32) Method
The type of Chart that will be added to the ChartCollection.
The Id of the Row associated with the top left corner of the new Chart.
The Id of the Column associated with the top left corner of the new Chart.
The Id of the Row associated with the bottom right corner of the new Chart.
The Id of the Column associated with the bottom right corner of the new Chart.
Example


In This Topic
    Add<T>(Int32,Int32,Int32,Int32) Method
    In This Topic
    Adds a TwoCellAnchor Chart of type T to the ChartCollection.
    Syntax
    'Declaration
     
    
    Public Overloads Function Add(Of T As {New, Chart})( _
       ByVal topLeftRowId As Integer, _
       ByVal topLeftColumnId As Integer, _
       ByVal bottomRightRowId As Integer, _
       ByVal bottomRightColumnId As Integer _
    ) As T
    'Usage
     
    
    Dim instance As ChartCollection
    Dim topLeftRowId As Integer
    Dim topLeftColumnId As Integer
    Dim bottomRightRowId As Integer
    Dim bottomRightColumnId As Integer
    Dim value As T
     
    value = instance.Add(Of T)(topLeftRowId, topLeftColumnId, bottomRightRowId, bottomRightColumnId)

    Parameters

    topLeftRowId
    The Id of the Row associated with the top left corner of the new Chart.
    topLeftColumnId
    The Id of the Column associated with the top left corner of the new Chart.
    bottomRightRowId
    The Id of the Row associated with the bottom right corner of the new Chart.
    bottomRightColumnId
    The Id of the Column associated with the bottom right corner of the new Chart.

    Type Parameters

    T
    The type of Chart that will be added to the ChartCollection.

    Return Value

    The Chart that has been added to the ChartCollection.
    Remarks
    RowColumn Ids are used to delimit the top left & bottom right corners of the new Chart.
    Example
    // Adds a LineChart with the generic Add method. The size of the Chart will be from Cell A1 to F6.
    var lineChart = worksheet.Charts.Add<LineChart>( 0, 0, 5, 5 );
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also